//灌溉
#include <bits/stdc++.h>
using namespace std;
#define N 110
int arr[N][N] = {0};
int arrcpy[N][N] = {0};
int main()
{
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int n=0,m=0,t=0,k=0;
	cin >>n>>m>>t;
	//布置水管
	for(int i = 1;i <= t; i++)
	{
		int tmp1,tmp2;
		cin >>tmp1>>tmp2;
		arr[tmp1][tmp2] = 1;
	}
	//灌溉
	cin>>k;
	while(k--)
	{
		for(int i = 1; i<=n;i++)
		{
			for(int j = 1; j<=m;j++)
			{
				if(arr[i][j] == 1)
				{
					arrcpy[i][j] = arrcpy[i-1][j] = arrcpy[i+1][j] = arrcpy[i][j-1] = arrcpy[i][j+1] = 1;
				}
			}
		}
		//更新
		for(int i = 1; i<=n;i++)
		{
			for(int j = 1; j<=m;j++)
			{
				arr[i][j]=arrcpy[i][j];
			}
		}
		
	}
	//遍历花园计算灌溉数
	int sum = 0;
	for(int i = 1; i<=n;i++)
	{
		for(int j = 1; j<=m;j++)
		{
			if(arr[i][j] == 1)
				sum++;
		}
	}
	cout<<sum;
	
	
	
	return 0;
}
